package mobile.game.common.config.json;

import java.util.List;

public class JRoot {
	private List<JNode> nodes;
	
	public List<JNode> getNodes() {
		return nodes;
	}

	public void setNodes(List<JNode> nodes) {
		this.nodes = nodes;
	}

	public JNode getNodeByName(String name) {
		for (int i=0; i<nodes.size(); ++i) {
			JNode nodeJson = nodes.get(i);
			if (nodeJson.getName().equals(name)) {
				return nodeJson;
			}
		}
		
		return null;
	}
}
